package cn.han.oop2;
//本类用于测试抽象类中构造函数的使用
public class AbstractDemo2 {
    public static void main(String[] args) {
        Animal2 a = new Pig2();
    }
}
abstract class Animal2{
    public Animal2(){
        System.out.println("我是抽象类的构造方法");
    }

}
class Pig2 extends Animal2{
    public Pig2(){
        System.out.println("我是猪");
    }
}




